<?php

namespace Aiweline\AiReviewForMagentoProduct\Lib\Magento;

use Weline\Framework\Manager\ObjectManager;

class Config
{
    static string $admin_token = '';
    static array $products = [];
    static function config(): \Aiweline\AiReviewForMagentoProduct\Helper\Config
    {
        return ObjectManager::getInstance(\Aiweline\AiReviewForMagentoProduct\Helper\Config::class);
    }

    static function get(string $key)
    {
        return self::config()->get($key);
    }

    static function api(string $path): string
    {
        return self::config()->get('host') . '/rest/all/V1/' . $path;
    }

    static function url(string $path): string
    {
        return self::config()->get('host') . '/' . $path;
    }
}